# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-jproperties
_pkgname=${pkgname#python-}
pkgver=2.1.2
pkgrel=1
epoch=1
pkgdesc='Java Property file parser and writer for Python.'
arch=('any')
url='https://github.com/Tblue/python-jproperties'
license=('BSD')
depends=('python' 'python-six')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('463e961b353d0af7c7dc41e4f5f502444ee903a20f62b3229bc649a35d8a0d49927e5512c731ff5b8b5406c00a08568b8fe7c9f76dba4ab69d3fb8d90133ccc3')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

